import { defineStore } from "pinia"

export let useProduct = defineStore('product', {
    state() {
        return {
            productData: []
        }
    },
    actions: {
        async fetch_data (){
            let res = await fetch('/api/data/index.json')
                .then(body => body.json())
                console.log(res);
                this.productData=res.data
        }
    }
})